
class entry(object):
    
    VERBS = ["Edit Content"]
    
    def __init__(self):
        self.page = ""
    
    def realize(self, event):
        self.realized = event
        if hasattr(event.shape, 'value'):
            self.page = event.shape.value
    
    def please(self, event):
        return self.page

    def verb(self, event):
        import gtk
        d = gtk.MessageDialog(message_format = "Constant",
            buttons = gtk.BUTTONS_OK_CANCEL)
        b = gtk.TextBuffer()
        e = gtk.TextView(b)
        sw = gtk.ScrolledWindow()
        sw.add_with_viewport(e)
        b.set_text(self.page)
        
        def fine(x,r):
            self.page = b.get_text(b.get_start_iter(), b.get_end_iter())
            self.realized.shape.value = self.page
            x.destroy()
        d.connect("response", fine)
        d.vbox.add(sw)
        e.show()
        sw.show()
        d.run()
